From 6d55f5160369dc5adec0a3ac8a1725b8fddc2f7c Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Wed, 19 Oct 2005 11:51:25 +0100 Subject: [PATCH] Remove unused shadow_control functionality from the Python layer. This is handled in xc_linux_save, and no-one in the Python layer uses this functionality directly. Signed-off-by: Ewan Mellor --- tools/python/xen/lowlevel/xc/xc.c | 30 ----------------------------- tools/python/xen/xend/XendDomain.py | 9 +-------- 2 files changed, 1 insertion(+), 38 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 17027cdc2a..8e49d8036f 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -787,28 +787,6 @@ static PyObject *pyxc_sedf_domain_get(PyObject *self, "extratime", extratime); } -static PyObject *pyxc_shadow_control(PyObject *self, - PyObject *args, - PyObject *kwds) -{ - XcObject *xc = (XcObject *)self; - - uint32_t dom; - int op=0; - - static char *kwd_list[] = { "dom", "op", NULL }; - - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|i", kwd_list, - &dom, &op) ) - return NULL; - - if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, NULL) < 0 ) - return PyErr_SetFromErrno(xc_error); - - Py_INCREF(zero); - return zero; -} - static PyObject *pyxc_domain_setmaxmem(PyObject *self, PyObject *args, PyObject *kwds) @@ -1115,14 +1093,6 @@ static PyMethodDef pyxc_methods[] = { "Returns [dict]: information about Xen" " [None]: on failure.\n" }, - { "shadow_control", - (PyCFunction)pyxc_shadow_control, - METH_VARARGS | METH_KEYWORDS, "\n" - "Set parameter for shadow pagetable interface\n" - " dom [int]: Identifier of domain.\n" - " op [int, 0]: operation\n\n" - "Returns: [int] 0 on success; -1 on error.\n" }, - { "domain_setmaxmem", (PyCFunction)pyxc_domain_setmaxmem, METH_VARARGS | METH_KEYWORDS, "\n" diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 235e39f633..0b50c83b55 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -473,14 +473,7 @@ class XendDomain: if not dev: raise XendError("invalid vif") return dev.setCreditLimit(credit, period) - - def domain_shadow_control(self, domid, op): - """Shadow page control.""" - dominfo = self.domain_lookup(domid) - try: - return xc.shadow_control(dominfo.getDomid(), op) - except Exception, ex: - raise XendError(str(ex)) + def domain_maxmem_set(self, domid, mem): """Set the memory limit for a domain. -- 2.30.2